Update CTABanner and deprecate Bento - #1332
Conversation
🦋 Changeset detectedLatest commit: f9a5645 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔍 Design token changes foundView CSS variable changes+ --brand-CTABanner-color-heading-emphasis: var(--base-color-scale-green-7);+ --brand-CTABanner-color-logo-muted: var(--brand-color-text-muted);+ --brand-CTABanner-color-logo-emphasis: var(--brand-color-text-default);+ --brand-CTABanner-color-logo-filter-muted: brightness(0) saturate(100%) invert(37%) sepia(7%) saturate(778%) hue-rotate(171deg) brightness(96%) co+ --brand-CTABanner-color-logo-filter-emphasis: brightness(0) saturate(100%) invert(12%) sepia(20%) saturate(450%) hue-rotate(172deg) brightness(100+ --brand-CTABanner-color-heading-emphasis: var(--brand-color-text-emphasized);+ --brand-CTABanner-color-logo-muted: var(--brand-color-text-muted);+ --brand-CTABanner-color-logo-emphasis: var(--brand-color-text-default);+ --brand-CTABanner-color-logo-filter-muted: brightness(0) saturate(100%) invert(61%) sepia(8%) saturate(430%) hue-rotate(171deg) brightness(94%) co+ --brand-CTABanner-color-logo-filter-emphasis: brightness(0) saturate(100%) invert(91%) sepia(2%) saturate(2455%) hue-rotate(193deg) brightness(107- --brand-Testimonial-quote-color-emphasis: #1a7f37;
+ --brand-Testimonial-quote-color-emphasis: var(--base-color-scale-green-7);- --brand-Testimonial-quote-color-emphasis: #5fed83;
+ --brand-Testimonial-quote-color-emphasis: var(--brand-color-text-emphasized);- --brand-Testimonial-quote-color-emphasis: #1a7f37;
+ --brand-Testimonial-quote-color-emphasis: var(--base-color-scale-green-7); |
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 0 new tests, 0 removed tests, 0 improved, 2 decreased
|
There was a problem hiding this comment.
Pull request overview
Updates the CTABanner component to align with the Brand Refactor designs (new logo/link support, updated sizing/defaults, duotone heading emphasis) and begins deprecating Bento, including migrating a Flexsuite recipe from Bento to CTABanner.
Changes:
- Extended
CTABannerAPI withCTABanner.LogoandCTABanner.Link, plus improved heading/image defaults and updated styling. - Added/updated CTABanner unit + visual coverage, Storybook feature stories, and Next Docs usage docs.
- Deprecated
Bento(code + docs) and migrated the Flexsuite AI overview recipe + localized content keys accordingly.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/recipes/Flexsuite/Overview/FlexSuiteAIOverview.tsx | Replaces in-recipe Bento usage with a CTABanner instance (logo/link/image). |
| packages/react/src/recipes/Flexsuite/Overview/FlexSuiteAIOverview.module.css | Removes Bento-specific styling now that the recipe uses CTABanner. |
| packages/react/src/recipes/Flexsuite/Overview/FlexSuiteAIOverview.module.css.d.ts | Removes deleted Bento-related class typings. |
| packages/react/src/recipes/Flexsuite/Overview/FlexSuiteAIOverview.content.ts | Splits the old Bento heading string into prefix/emphasis segments for the new heading markup. |
| packages/react/src/CTABanner/CTABanner.tsx | Adds Logo + Link subcomponents; adjusts heading sizing behavior and image prop typing. |
| packages/react/src/CTABanner/CTABanner.module.css | Updates layout/spacing, adds logo/link/duotone heading styles, and adjusts balanced image sizing. |
| packages/react/src/CTABanner/CTABanner.module.css.d.ts | Adds typings for new CSS module classnames. |
| packages/react/src/CTABanner/CTABanner.test.tsx | Adds unit coverage for logo/link rendering, ref/class forwarding, heading default sizing, and duotone markup. |
| packages/react/src/CTABanner/CTABanner.features.stories.tsx | Adds Storybook feature stories for logo/link/duotone heading variations. |
| packages/react/src/CTABanner/CTABanner.visual.spec.ts | Adds visual regression cases for the new feature stories. |
| packages/react/src/CTABanner/CTABanner.visual.spec.ts-snapshots/Visual-Comparison-CTABanner-CTABanner-With-Link-1-darwin.png | Updates/adds visual baseline for the new “With Link” case. |
| packages/react/src/Bento/Bento.tsx | Adds JSDoc deprecation notice directing consumers to CTABanner / River. |
| apps/next-docs/content/components/CTABanner/react.mdx | Documents logo/link/duotone usage and updates heading sizing notes. |
| apps/next-docs/content/components/Bento/index.mdx | Adds a deprecation warning note in the docs. |
| apps/storybook/static/locales/*/FlexSuiteOverview.json | Updates i18n keys for the new heading prefix/emphasis split. |
| packages/e2e/scripts/playwright/run-visual-tests | Fails fast locally if port 6006 is already in use (prevents confusing visual test runs). |
| packages/e2e/scripts/playwright/update-visual-snapshots | Same port 6006 preflight check for snapshot updates. |
| packages/design-tokens/src/tokens/functional/components/cta-banner/colors.js | Adds CTA banner logo color/filter tokens. |
| packages/design-tokens/src/tokens/functional/components/testimonial/colors.json | Aligns testimonial emphasis color to the shared emphasized text token. |
| .changeset/loud-banners-shine.md | Changeset describing new CTABanner capabilities and updated defaults. |
| package-lock.json | Updates workspace versions/lockfile to the new release version. |
Copilot's findings
- Files reviewed: 22/34 changed files
- Comments generated: 1
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
There was a problem hiding this comment.
FYI... this visual diff change to heading is intentional. The code is applying display as a test in the source code, which wasn't previously being forwarded. Now that's been fixed.
kellyquesnel
left a comment
There was a problem hiding this comment.
From a design POV, all viewports and color modes behave properly
Summary
Towards https://github.com/github/brand-marketing-design/issues/2606
Updates CTABanner to further match Brand Refactor designs and extend feature set. Also deprecates Bento as it's a retired style that is being replaced by CTABanner and River in newer LP designs.
List of notable changes:
balancedvariantWhat should reviewers focus on?
Steps to test:
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots:
New logo support
### New duotone heading

New optional link